var tempclassname = "";
// 载入多叉树 
var setting = {
	async : {
		enable : true,
		contentType: "application/x-www-form-urlencoded",
		url : "xjjcjson_loadgxtreenode.action",
		autoParam : [],
		otherParam : {"treename":"日常巡检工序"}
	},
	edit : {
		enable : false 
	},
	view : {
		// zTree 节点展开、折叠时的动画速度，设置方法同 JQuery 动画效果中 speed 参数
		expandSpeed : ""
	},
	check : {
		enable : false,
		chkStyle : "checkbox"
	},
	data : {
		simpleData : {
			enable : true
		}
	},
	callback : {  
		onClick : onClick,  
		onAsyncSuccess : onAsyncSuccess
	}
};
// 完成异步加载后 
function onAsyncSuccess(event, treeId, treeNode, msg) {
	var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
	var node = treeObj.getNodeByParam("name", '日常巡检工序', null);
	expandAll(); 
}
  
function onClick(event, treeId, treeNode) {   
	 treeSearch(treeNode.cc,treeNode.id); 
	 var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
	 treeObj.expandNode(treeNode, true, false);  
}
  
function expandAll()
{ 
	var zTree = $.fn.zTree.getZTreeObj("treeDemo");
	zTree.expandAll(true);
}
function collapseAll()
{
	var zTree = $.fn.zTree.getZTreeObj("treeDemo");
	zTree.expandAll(false);
}
 